home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / gs24src.zip / GCONFIG.C < prev    next >
C/C++ Source or Header  |  1992-03-05  |  2KB  |  72 lines

  1. /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises.  All rights reserved.
  2.    Distributed by Free Software Foundation, Inc.
  3.  
  4. This file is part of Ghostscript.
  5.  
  6. Ghostscript is distributed in the hope that it will be useful, but
  7. WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  8. to anyone for the consequences of using it or for whether it serves any
  9. particular purpose or works at all, unless he says so in writing.  Refer
  10. to the Ghostscript General Public License for full details.
  11.  
  12. Everyone is granted permission to copy, modify and redistribute
  13. Ghostscript, but only under the conditions described in the Ghostscript
  14. General Public License.  A copy of this license is supposed to have been
  15. given to you along with Ghostscript so you can know your rights and
  16. responsibilities.  It should be in a file named COPYING.  Among other
  17. things, the copyright notice and this notice must be preserved on all
  18. copies.  */
  19.  
  20. /* gconfig.c */
  21. /* Installed device table for Ghostscript */
  22. #include "gs.h"
  23. /*
  24.  * Since we only declare variables of type gx_device *,
  25.  * it should be sufficient to define struct gx_device_s as
  26.  * an abstract (undefined) structure.  However, the VAX VMS compiler
  27.  * isn't happy with this, so we have to include the full definition.
  28.  */
  29. #include "gxdevice.h"
  30.  
  31. /*
  32.  * The Ghostscript makefile generates the file gconfig.h, which consists of
  33.  * lines of the form
  34.  *    device_(gs_xxx_device)
  35.  * for each installed device, and
  36.  *    oper_(zxxx_op_defs)
  37.  * for each operator option.  We include this file twice, once to declare
  38.  * the devices as extern, and once to generate the table of pointers.
  39.  */
  40.  
  41. /* Here is where the library search path and the name of the */
  42. /* initialization file are defined.  We supply defaults just in case */
  43. /* someone compiles the file without the proper command line flags. */
  44. #ifndef GS_LIB_DEFAULT
  45. #  define GS_LIB_DEFAULT ""
  46. #endif
  47. #ifndef GS_INIT
  48. #  define GS_INIT "gs_init.ps"
  49. #endif
  50. const char *gs_lib_default_path = GS_LIB_DEFAULT;
  51. const char *gs_init_file = GS_INIT;
  52.  
  53. /* Optional operators are handled in iinit.c. */
  54. #define oper_(defs)
  55.  
  56. #define device_(dev) extern gx_device dev;
  57. #include "gconfig.h"
  58. #undef device_
  59.  
  60. gx_device *gx_device_list[] = {
  61. #define device_(dev) &dev,
  62. #include "gconfig.h"
  63. #undef device_
  64.     0
  65. };
  66.  
  67. /* Some C compilers insist on executable code here, so.... */
  68. void
  69. gconfig_dummy()
  70. {
  71. }
  72.